package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.BankAccountUpsertReqDTO;
import com.jzo2o.customer.model.dto.response.BankAccountResDTO;
import com.jzo2o.customer.service.IBankAccountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController("BankAccountController")
@RequestMapping("/agency/bank-account")
@Api(tags = "机构端 - 新增或更新银行账号信息接口")
@RequiredArgsConstructor
public class BankAccountController {
    private final IBankAccountService bankAccountService;

    @PostMapping
    @ApiOperation("新增或更新银行账号信息")
    public void addBankAccount(@RequestBody BankAccountUpsertReqDTO bankAccountUpsertReqDTO) {
        // TODO: 实现新增或更新银行账号信息的逻辑
        bankAccountService.addBankAccount(bankAccountUpsertReqDTO);
    }

    @GetMapping("/currentUserBankAccount")
    @ApiOperation("获取银行账号信息")
    public BankAccountResDTO getBankAccount() {
        // TODO: 实现获取银行账号信息的逻辑
        return bankAccountService.getBankAccount();
    }
}
